package Day12;

import java.util.TreeSet;

public class Demo06 {
    public static void main(String[] args) {
        //TreeSet  有序存储
        TreeSet<String> set = new TreeSet<>();
        set.add("A");
        set.add("B");
        set.add("D");
        set.add("B");
        for (String s:set){
            System.out.println(s);
            //A
            //B
            //D
        }

    }
}
